const { orgModel } = require("../models/org");

const getOrgInfoById = async (ctx) => {
  const { OrgId } = ctx.request.query;
  const res = await orgModel.findOne({ Id: OrgId });
  if (res) {
    ctx.body = {
      code: 200,
      msg: "获取机构信息成功",
      data: res,
    }
  } else {
    ctx.body = {
      code: 404,
      msg: "未获取到机构信息",
      data: null,
    }
  }
}
module.exports = {
  getOrgInfoById
};